﻿var pathHome = "http://localhost:35263/";

function prepareValidationData(form) {
    if (form.executed)
        return;
    form.removeData("validator");
    $.validator.unobtrusive.parse(document);
    form.executed = true;
}

function onSubmit(s, e) {
    var form = $('.edit_form');
    prepareValidationData(form);
    var isValid = form.validate().form();
    if (isValid) {
        form.submit();
    }
};
